<#--
	Description:恩付商品详细列表
	Author：Wangxuegang
	Date：2013-06-05
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>恩付商品列表</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "../template/include/assign.ftl">
<#include "../template/include/source.ftl">
<#include "../template/template_listPage.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}
</style>
<script type="text/javascript">

	function editProduct(id) {
        var url = "${web_base}/game/enfu!editProduct.htm?id=" + id;
        document.forms[1].action = encodeURI(url);
        document.forms[1].submit();
	 }
</script>


</head>
<body class="list">
	<div class="body">
		<div class="listBar">
				<h1><span class="icon">&nbsp;</span>恩付商品详细管理&nbsp;<span class="pageInfo"></span></h1>
		</div>
		<div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
	            <div class="validateErrorTitle">以下信息填写有误,请重新填写</div>
	            <ul></ul>
      	</div>
      	
  		<div class="operateBar">
            <label>对商品进行批量操作：</label><input type="button" class="addButton" 
                 onclick="location.href='${web_base}/game/enfu!batchOnline.htm'"  value="批量上架" />
            <input type="button" class="addButton" 
                onclick="location.href='${web_base}/game/enfu!batchOffline.htm'"  value="批量下架" />
               	说明：对商品供应表中此供应商的商品进行批量上下架.
   		 </div>
      	
		<@pageList page=(page!) id="listForm" 
			    action="${web_base}/game/enfu!goodsDetailList.htm" query="enfuQuery" isEmpty=true>
			<div class="operateBar">
				<label>查找:</label>
				自定义原始商品编号：<input type="text" name="enfuQuery.definedproductid"  
				 		        value="<#if enfuQuery??>${(enfuQuery.definedproductid)!}</#if>" />
				 商品名称：<input type="text" name="enfuQuery.productname"  
				      value="<#if enfuQuery??>${(enfuQuery.productname)!}</#if>" />
				中心商品编号：<input type="text" name="enfuQuery.productid"  
				 		        value="<#if enfuQuery??>${(enfuQuery.productid)!}</#if>" />
	 		        游戏名称：<input type="text" name="enfuQuery.gamename"  
	 		        value="<#if enfuQuery??>${(enfuQuery.gamename)!}</#if>" />
				<br> 		        
				商品类型：<select name="enfuQuery.producttype" id="producttype">
									<#if enfuQuery.producttype??>
										<#if enfuQuery.producttype == "直充">
											<option value="直充" selected="selected">
												直充
											</option>
											<option value="" >请选择...</option>
											<option value="卡密" >
												卡密
											</option>
										<#elseif enfuQuery.producttype == "卡密">	
											<option value="卡密" selected="selected">
												卡密
											</option>
											<option value="" >请选择...</option>
											<option value="直充">
												直充
											</option>
										</#if>	
									<#else>
										<option value="" selected="selected">请选择...</option>
										<option value="直充" >
											直充
										</option>
										<option value="卡密" >
											卡密
										</option>
									</#if>
							 		
					  </select>  
				     是否审核：
					<select name="enfuQuery.isAudit" id="isAudit">
								<#if enfuQuery.isAudit??>
										<#if enfuQuery.isAudit == "1">
											<option value="1" selected="selected">
												已审核
											</option>
											<option value="">请选择...</option>
											<option value="0" >
												未审核
											</option>
										<#elseif enfuQuery.isAudit == "0">	
											<option value="0" selected="selected">
													未审核
											</option>
											<option value="">请选择...</option>
											<option value="1">
													已审核
											</option>
										</#if>
								<#else>
									<option value="" selected="selected">请选择...</option>
									<option value="0" >
										未审核
									</option>
									<option value="1">
											已审核
									</option>	
								</#if>
					</select>    
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="submit" id="searchButton" class="searchButton" value="" />
				<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<span id="orderSpan" style="color: red;">注：商品详细中，有些商品的游戏名称为空！</span>
			</div>
			<table class="listTable">
				<tr>
					<th>
						<span class="sort" name="definedproductid">自定义原始商品编号</span>
					</th>
					<th>
						<span class="sort" name="productname">商品名称</span>
					</th>
                    <th>
                        <span class="sort" name="producttype">商品充值类型</span>
                    </th>
					<th>
						<span class="sort" name="productid">商品中心商品编号</span>
					</th>
					<th>
                        <span class="sort" name="gamename">游戏名称</span>
                    </th>
					<th>
						<span class="sort" name="inserttime">插入时间</span>
					</th>
					<th>
						<span class="sort" name="operator">操作员账号</span>
					</th>
					<th>
						<span class="sort" name="isAudit">是否审核</span>
					</th>
					<th>
						<span class="sort" >操作</span>
					</th>
				</tr>
				<#if page?? && page.list?? && (page.list?size gt 0)>
					<#list page.list as obj>
						<tr>
							<td>
								${(obj.definedproductid)!}
							</td>
							<td>
	                           <#if obj.productname?? && obj.productname?length gte 15>
	                                <#--//截取输出文字的长度-->
	                                ${obj.productname?substring(0,15)}...
	                            <#else>
	                                ${(obj.productname)!}
	                            </#if>
							</td>
							<td>
								<#if obj.producttype?? && obj.producttype=="直充">
								直充
								<#else>
								卡密
								</#if>
							</td>
							<td>
								${(obj.productid)!}
							</td>
							<td>
	                           <#if obj.gamename?? && obj.gamename?length gte 15>
	                                <#--//截取输出文字的长度-->
	                                ${obj.gamename?substring(0,15)}...
	                            <#else>
	                                ${(obj.gamename)!}
	                            </#if>
							</td>
							<td>
								${(obj.inserttime)!}
							</td>
							<td>
								${(obj.operator)!}
							</td>
							<td>
								<#if obj.isAudit == "1">
								已审核
								<#elseif obj.isAudit == "0">
								未审核
								</#if>
							</td>
							<td>
								<#if obj.isAudit == "1">
								 <span class="spanLink" onclick="editProduct('${(obj.id)!}');" title="审核" disabled="true">[审核]</span>
								<#elseif obj.isAudit == "0">
								 <span class="spanLink" onclick="editProduct('${(obj.id)!}');" title="审核">[审核]</span>
								</#if>
		                       
	                        </td>
						</tr>
					</#list>
			 	</#if>
			</table>
			<#if page?? && page.list?? && (page.list?size <= 0)>
				<div class="noRecord">
					没有找到任何记录!
				</div>
			</#if>
	</@pageList>
	</div>
</body>
</html>
